<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
    <title>BHF Validation</title>
<head>
</head>
<body bgcolor="white">
<p>
    To validate an object, you must first establish a <code>ContextLocation</code> and then use
    code such as the following. If you are using BHF services/components/widgets, the <code>ContextLocation</code>
    will be set up for you based on browser information.
    <code><pre>
        final Messages m = new Validator().validateObject( objectToBeValidated ) );
    </pre></code>
    If validation fails, there will be at least one message, otherwise the collection will be empty
    (not <code>null</code>). The topic of each messages is the property path to the relevant property,
    root at 'objectToBeValidated'. Thus, topic can be used to correlate the errors back to the appropriate
    fields.
</p><p>
    Like BHF JSON, BHF Validation generates validation objects at runtime for the highest performance. Thus,
    validation shares some of the same limitations as the JSON writer. In particular, cyclic object graphs
    are not allowed. Within the context of BHF, only objects created from JSON parsing are validated; thus,
    these limitation pose no additional constraints on the application design.
</p><p>
    By default, the validators expects to find a resource bundle called 'validation' where the error messages
    are localized.
</p>
@see org.bhf.validation.annotations
</body>
</html>